Python Practice Lab by Angelica Lim;Victor Cheung; & Victor Cheung

Python Practice Lab by Angelica Lim;Victor Cheung; & Victor Cheung
Author: Angelica Lim;Victor Cheung; & Victor Cheung
Language: eng
Format: epub
Publisher: Princeton University Press
Published: 2026-01-28

Now our recommendation chatbot is complete! Try replacing your preferences with your friends’ preferences and see if they get the same recommendations!

3.2.6  Review Questions


Time to test how much you understand the content in this chapter. It is okay to go back and review!

THEORY AND UNDERSTANDING


How would you open a file called survey.txt?

How would you access the second to last element in a list called favourites?

What are two ways to read a line from a file?

How would you split a string of words into a list? Imagine that the words are separated by ;

A list contains the following: